<?php
declare (strict_types=1);

namespace app\common\model;

use cores\BaseModel;

/**
 * 订单第三方支持回调日志
 * Class OrderCallbackLog
 * @package app\common\model
 */
class OrderCallbackLog extends BaseModel
{
    // 定义表名
    protected $name = 'order_callback_log';

    // 定义主键
    protected $pk = 'id';

    /**
     * 新增记录
     * @param int $scene
     * @param array $data
     */
    public static function add( $channel_name, array $data)
    {
        $model = new static;
        $model->save(array_merge([
            'channel_name' => $channel_name,
            'store_id' => $model::$storeId
        ], $data));
    }

}
